Skip to content

Add agent PR labeling workflow#504

Open
AndreaGriffiths11 wants to merge 3 commits into
mainfrom
add-event-issue-489
Open

Add agent PR labeling workflow#504
AndreaGriffiths11 wants to merge 3 commits into
mainfrom
add-event-issue-489

Conversation

@AndreaGriffiths11

Copy link
Copy Markdown
Contributor

Adds a GitHub Actions workflow to auto-label bot/agent-created pull requests with the robot label.

Copilot AI review requested due to automatic review settings June 8, 2026 22:57
GitHub Advanced Security started work on behalf of AndreaGriffiths11 June 8, 2026 22:57 View session
GitHub Advanced Security finished work on behalf of AndreaGriffiths11 June 8, 2026 22:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Actions workflow to automatically apply a robot label to pull requests opened by bots/automated agents, helping maintainers quickly identify automated PRs.

Changes:

  • Introduces a label-agent-prs workflow triggered on PR open/reopen events.
  • Ensures the robot label exists (creating it if missing) and applies it to qualifying PRs.
Show a summary per file
File Description
.github/workflows/label-agent-prs.yml Adds an Actions workflow to create (if needed) and apply a robot label to bot/agent PRs.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment on lines +3 to +7
on:
pull_request:
types:
- opened
- reopened
Comment on lines +27 to +45
try {
await github.rest.issues.getLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: labelName,
});
} catch (error) {
if (error.status === 404) {
await github.rest.issues.createLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: labelName,
color: labelColor,
description: labelDescription,
});
} else {
throw error;
}
}
GitHub Advanced Security started work on behalf of AndreaGriffiths11 June 8, 2026 23:00 View session
GitHub Advanced Security finished work on behalf of AndreaGriffiths11 June 8, 2026 23:01
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
GitHub Advanced Security started work on behalf of AndreaGriffiths11 June 9, 2026 00:19 View session
GitHub Advanced Security finished work on behalf of AndreaGriffiths11 June 9, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants